//
// Created by ziya on 2021/11/2.
//

#ifndef THREAD_POOL_PARKEVENT_H
#define THREAD_POOL_PARKEVENT_H
#include "../../include/common.h"

class ParkEvent {

private:
    pthread_mutex_t  lock[1];

    pthread_cond_t condt[1];

public:
    ParkEvent();

    ~ParkEvent(){

        unPark();
    }

    void park();

    void unPark() {

        pthread_cond_signal(condt);

    }
};


#endif //THREAD_POOL_PARKEVENT_H
